import xadmin

from .models import *


class T_new_movieAdmin(object):
    #显示列
    list_display =['id','movie_id','box_office','buy']
    #指定搜索内容
    search_fields = ['movie_id','box_office','buy']
    #过滤器
    list_filter = ['movie_id','box_office','buy']
    pass

class T_movieAdmin(object):
    #显示列
    list_display =['id', 'movie_name','score','directors','actors','release_date']
    #指定搜索内容
    search_fields = ['movie_name','score','directors','actors']
    #过滤器
    list_filter = ['movie_name','score','directors','actors']
    pass

class T_movie_linesAdmin(object):
    #显示列
    list_display =['id','movie_id','line']
    #指定搜索内容
    search_fields = ['id','movie_id','line']
    #过滤器
    list_filter = ['id','movie_id','line']
    pass

class T_movie_targetAdmin(object):
    #显示列
    list_display =['id','target','remark']
    #指定搜索内容
    search_fields = ['id','target']
    #过滤器
    list_filter = ['id','target']
    pass

class T_movie_classAdmin(object):
    #显示列
    list_display =['id','target_id','movie_id']
    #指定搜索内容
    search_fields = ['id','target_id','movie_id']
    #过滤器
    list_filter = ['id','target_id','movie_id']
    pass


xadmin.site.register(T_new_movie, T_new_movieAdmin)
xadmin.site.register(T_movie, T_movieAdmin)
xadmin.site.register(T_movie_lines, T_movie_linesAdmin)
xadmin.site.register(T_movie_target, T_movie_targetAdmin)
xadmin.site.register(T_movie_class, T_movie_classAdmin)
